package com.example.demo.controller;

import com.example.demo.scheduledtask.WmsPurchaseNewCallback;
import com.example.demo.vo.SlCallbackListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author : Zhang.yt
 * @date : 2024/4/28
 */
@Api(tags = "仓库采购回写API")
@RestController
@RequestMapping("/wmsPurchaseNew")
public class WmsPurchaseNewController {
    @Resource
    private WmsPurchaseNewCallback wmsPurchaseNewCallback;

    @PostMapping("/purchaseGet")
    @ApiOperation(value = "采购收货回调")
    public String purchaseGet(){
        wmsPurchaseNewCallback.purchaseGet();
        return "成功";
    }

    @PostMapping("/genIqcData")
    @ApiOperation(value = "iqc检验回写")
    public String genIqcData(){
        wmsPurchaseNewCallback.genIqcData();
        return "成功";
    }

    @PostMapping("/deleteGenIqcData")
    @ApiOperation(value = "删除iqc检验回写")
    public String deleteGenIqcData(String orderNo){
        return wmsPurchaseNewCallback.deleteGenIqcData(orderNo);
    }


    @PostMapping("/purchaseIn")
    @ApiOperation(value = "采购上架回写")
    public String purchaseIn(){
        wmsPurchaseNewCallback.purchaseIn();
        return "成功";
    }

    @PostMapping("/updateCodeInfo")
    @ApiOperation(value = "更新erp检验信息")
    public String updateCodeInfo(){
        wmsPurchaseNewCallback.updateCodeInfo();
        return "成功";
    }
}
